home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / a_utils / perl / msds-prl / ptchds19.zoo / dbm_t < prev    next >
Text File  |  1992-02-23  |  3KB  |  115 lines

  1. MS-DOS patches to perl.
  2. Apply this patch to the standard perl source, version 4, patch level 19,
  3. using "patch -p."  Do this in the root directory of the perl source
  4. distribution.
  5.  
  6. You can cat all these patches together and pipe the output to patch -p.
  7.  
  8. Len Reed
  9. Holos Software, Inc.
  10. ..!gatech!holos0!lbr
  11. holos0!lbr@gatech.edu
  12. --------------------------------------
  13. *** t/op/dbm.t.old    Tue Apr 23 22:38:40 1991
  14. --- t/op/dbm.t    Thu Nov 14 08:57:10 1991
  15. ***************
  16. *** 2,8 ****
  17.   
  18.   # $Header: dbm.t,v 4.0 91/03/20 01:51:52 lwall Locked $
  19.   
  20. ! if (!-r '/usr/include/dbm.h' && !-r '/usr/include/ndbm.h') {
  21.       print "1..0\n";
  22.       exit;
  23.   }
  24. --- 2,11 ----
  25.   
  26.   # $Header: dbm.t,v 4.0 91/03/20 01:51:52 lwall Locked $
  27.   
  28. ! eval('umask');    # won't work on MS-DOS
  29. ! $msdos = $@;
  30. ! if (!$msdos && !-r '/usr/include/dbm.h' && !-r '/usr/include/ndbm.h') {
  31.       print "1..0\n";
  32.       exit;
  33.   }
  34. ***************
  35. *** 9,20 ****
  36.   
  37.   print "1..12\n";
  38.   
  39. ! unlink <Op.dbmx.*>;
  40. ! umask(0);
  41. ! print (dbmopen(h,'Op.dbmx',0640) ? "ok 1\n" : "not ok 1\n");
  42.   ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
  43. !    $blksize,$blocks) = stat('Op.dbmx.pag');
  44. ! print (($mode & 0777) == 0640 ? "ok 2\n" : "not ok 2\n");
  45.   while (($key,$value) = each(h)) {
  46.       $i++;
  47.   }
  48. --- 12,31 ----
  49.   
  50.   print "1..12\n";
  51.   
  52. ! if ($msdos) {
  53. !     # Not really needed, but using TMPDIR, when it's a RAM disk directory,
  54. !     # speeds this test a lot.
  55. !     if (defined($tdir = $ENV{'TMPDIR'})) {
  56. !     chdir ($tdir);
  57. !     }
  58. ! }
  59. ! unlink <Op_dbmx.*>;
  60. ! umask(0) unless $msdos;
  61. ! print (dbmopen(h,'Op_dbmx',0640) ? "ok 1\n" : "not ok 1\n");
  62.   ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
  63. !    $blksize,$blocks) = stat('Op_dbmx.pag');
  64. ! print ($msdos || ($mode & 0777) == 0640 ? "ok 2\n" : "not ok 2\n");
  65.   while (($key,$value) = each(h)) {
  66.       $i++;
  67.   }
  68. ***************
  69. *** 40,46 ****
  70.   delete $h{'goner2'};
  71.   
  72.   dbmclose(h);
  73. ! print (dbmopen(h,'Op.dbmx',0640) ? "ok 4\n" : "not ok 4\n");
  74.   
  75.   $h{'j'} = 'J';
  76.   $h{'k'} = 'K';
  77. --- 51,57 ----
  78.   delete $h{'goner2'};
  79.   
  80.   dbmclose(h);
  81. ! print (dbmopen(h,'Op_dbmx',0640) ? "ok 4\n" : "not ok 4\n");
  82.   
  83.   $h{'j'} = 'J';
  84.   $h{'k'} = 'K';
  85. ***************
  86. *** 92,98 ****
  87.   print ($ok ? "ok 8\n" : "not ok 8\n");
  88.   
  89.   ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
  90. !    $blksize,$blocks) = stat('Op.dbmx.pag');
  91.   print ($size > 0 ? "ok 9\n" : "not ok 9\n");
  92.   
  93.   @h{0..200} = 200..400;
  94. --- 103,109 ----
  95.   print ($ok ? "ok 8\n" : "not ok 8\n");
  96.   
  97.   ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
  98. !    $blksize,$blocks) = stat('Op_dbmx.pag');
  99.   print ($size > 0 ? "ok 9\n" : "not ok 9\n");
  100.   
  101.   @h{0..200} = 200..400;
  102. ***************
  103. *** 102,105 ****
  104.   print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
  105.   print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");
  106.   
  107. ! unlink 'Op.dbmx.dir', 'Op.dbmx.pag';
  108. --- 113,116 ----
  109.   print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
  110.   print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");
  111.   
  112. ! unlink 'Op_dbmx.dir', 'Op_dbmx.pag';
  113.